-- ruby_ray
-- created by zhuangsl
-- 所受伤害百分比增加，且死亡时概率掉落宝石（红宝石射线）

return {
    fetchProps = function(who, status, condition)
        local props  = {};
        local endRound = condition["end_round"];

        -- 所受伤害提升
        local propId = PropM.getPropId("damage");
        local value  = tonumber(condition["value"]);
        table.insert(props, { propId, 1, value, endRound, });

        -- 死亡概率掉落宝石
        propId = PropM.getPropId("death_bonus");
        value  = tonumber(condition["drop_rate"]);
        table.insert(props, { propId, "jewel", value, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 所受伤害
        local value = condition["value"];
        value = math.modf(math.abs(value / 10));
        desc = string.gsub(desc, "{value}", value);

        -- 掉率
        value = tonumber(condition["drop_rate"]);
        value = math.modf(value / 10);
        desc = string.gsub(desc, "{rate}", value);

        return desc;
    end,
};
